<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <script src="jquery-1.8.2.min.js"></script>
    <style>

    </style>
</head>
<body>
    <div>John Resig</div>
    <div>gggg Resig</div>
    <div>Malcom John Sinclair</div>
    <div>J.Ohn</div>
</body>
<script>
    $(function () {
        $("div:contains('John')").css("text-decoration","underline");
    })
</script>
</html>